Alarm Operations

Read Operations Description

GetCurrentAlarms

Returns current alarm information from a CAS.

GetCurrentAlarms

Given a service name (CAS or UIS) and an optional alarm filter specification, this operation returns the set of current alarm records. The return XML will indicate success or failure.

Usage

The following table lists and describes all of the child elements of the request node (<GetCurrentAlarmsReq>).

Element Name Required Description

SvcName

Yes

The Site.Service to which to connect.  This parameter must specify the name of a CAS or UIS Site.Service. If a UIS is specified, the service will resolve to its associated CAS.

AlarmFilter

No

A set of rules to filter the returned alarms by real-time attributes, point configuration attributes, and/or facility attributes.

AlarmAttrsToExport

No

Indicates which alarm attributes to include in the response.

Filter

The alarm filter node (<AlarmFilter>) must contain a set of rules (based on real-time, point configuration, or facility attributes) used to filter the alarms which will be returned by this operation.  The filter may consist of a hierarchy of expressions using the <MultiExpr> and <SingleExpr> tags.  The following example will filter all alarms for which FacilityAttr0 contains the string "Test" AND AlarmHidden equals "true".

Copy
Alarm Filter Node
<AlarmFilter>
    <MultiExpr operator="AND" inverse="false">
        <SingleExpr compare="EQ">
            <FacilityAttr0>*Test*</FacilityAttr0>
        </SingleExpr>
        <SingleExpr compare="EQ">
            <AlarmHidden>true</AlarmHidden>
        </SingleExpr>
    </MultiExpr>
</AlarmFilter>
Target Services

The service name node (<SvcName>) must specify the name of a CAS or UIS Site.Service. If a UIS is specified, the service will resolve to its associated CAS.

Examples

Request
Copy
GetCurrentAlarms Request
<?xml version="1.0"?>
<CygNetEnterpriseOperations xmlns="https://CygNetSCADA.com/Schemas/CygNetEnterpriseObjectsnnn">
    <GetCurrentAlarmsReq>
        <SvcName>CYGDEMO.UIS</SvcName>
        <AlarmFilter>
            <MultiExpr operator="AND" inverse="false">
                <SingleExpr compare="EQ">
                    <FacilityAttr0>*Test*</FacilityAttr0>
                </SingleExpr>
                <SingleExpr compare="EQ">
                    <AlarmHidden>true</AlarmHidden>
                </SingleExpr>
            </MultiExpr>
        </AlarmFilter>
        <AlarmAttrsToExport>
            <PointId/>
        </AlarmAttrsToExport>
    </GetCurrentAlarmsReq>
</CygNetEnterpriseOperations>
Response

The following example represents a successful response.

Copy
GetCurrentAlarms Response
<CygNetEnterpriseOperations xmlns="https://CygNetSCADA.com/Schemas/CygNetEnterpriseObjectsnnn">
    <GetCurrentAlarmsResp>
        <AlarmPointList>
            <AlarmPoint>
                <AlarmInstanceId>
                    <PointTagLong>CYGDEMO.SVCMON:TESTPNT1</PointTagLong>
                    <AlarmRecordVersion>39868.95439833</AlarmRecordVersion>
                </AlarmInstanceId>
                <AlarmAttributes>
                    <PointId>0001387</PointId>
                </AlarmAttributes>
                </AlarmPoint>
        </AlarmPointList>
    <OperationResults success="true" resp_timestamp="2023-08-26T23:17:11.064Z" exec_duration="PT0.063S"/>
    </GetCurrentAlarmsResp>
</CygNetEnterpriseOperations>

The following example represents an unsuccessful response.

Copy
GetCurrentAlarms Response Unsuccessful
<?xml version="1.0" encoding="UTF-8"?>
<CygNetEnterpriseOperations xmlns="https://CygNetSCADA.com/Schemas/CygNetEnterpriseObjectsnnn">
    <GetCurrentAlarmsResp>
        <AlarmPointList />
        <OperationResults success="false" resp_timestamp="2023-07-30T22:13:06.532Z" exec_duration="PT0.002S">
            <OperationResult type="ERROR" code="50003">Security check failed for ACS application ENTOPS and event ACCESS0</OperationResult>
            <OperationResult type="ERROR" code="50208">You are not permitted to execute this operation</OperationResult>
        </OperationResults>
    </GetCurrentAlarmsResp>
</CygNetEnterpriseOperations>

Back to top